<?php
use \yii\helpers\Html;
use common\components\helpers\Util;
?>
<div class="yx-praise-list-box yx-praise-box yx-radius2 zx-min-height" style="padding: 0 20px">
<div class="modal-body">
    <h3 class="yx-font13 yx-pb6">课程信息：</h3>
    <table class="yx-course-info"  style="table-layout: fixed">
        <tr>
            <td>课程</td>
            <td><?=Html::encode($specialdatas['course_name'])?></td>
            <td>教师</td>
            <td><?=Html::encode($specialdatas['teacher_name'])?></td>
        </tr>
        <tr>
            <td>教室</td>
            <td><?=Html::encode($specialdatas['room_name'])?></td>
            <td>上课星期</td>
            <td><?=Html::encode($specialdatas['class_day'])?></td>
        </tr>
        <tr>
            <td>开班人数</td>
            <td><?=Html::encode($specialdatas['opening_number'])?></td>
            <td>最满人数</td>
            <td><?=Html::encode($specialdatas['max_number'])?></td>
        </tr>
        <tr>
            <td>是否可预约</td>
            <td><?=Html::encode($specialdatas['is_booking']==1?'是':'否')?></td>
            <td>上课次数</td>
            <td><?=Html::encode($specialdatas['class_count'])?></td>
        </tr>
        <tr id="goodscat_id">
            <td>分类</td>
            <td>
                <?=(!empty($category)&&isset($category->name))?$category->name:'';?>
            </td>
            <td>品牌</td>
            <td>
                <?=(!empty($brand)&&isset($brand->name))?$brand->name:'';?>
            </td>
        </tr>
        <tr id="goodsname">
            <td><?= $model->attributeLabels()['name']; ?></td>
            <td>
                <?=Html::encode($model->name);?>
            </td>
            <td><?= $model->attributeLabels()['sn']; ?></td>
            <td>
                <?=Html::encode($model->sn);?>
            </td>
        </tr>
        <tr id="goodsprice">
            <td><?= $model->attributeLabels()['mechanic_id']; ?></td>
            <td>
                <?=isset($model->mechanic->name)?Html::encode($model->mechanic->name):'';?>
            </td>
            <td><?= $model->attributeLabels()['cost']; ?></td>
            <td>
                <?=Html::encode($model->cost);?>
            </td>
        </tr>
        <tr id="goodscost">
            <td><?= $model->attributeLabels()['price']; ?></td>
            <td>
                <?=Html::encode($model->price);?>
            </td>
            <td><?= $model->attributeLabels()['market_price']; ?></td>
            <td>
            </td>
        </tr>
        <tr id="goodsstore">
            <td><?= $model->attributeLabels()['store']; ?></td>
            <td>
                <?=Html::encode($model->store);?>
            </td>
            <td><?= $model->attributeLabels()['picture']; ?></td>
            <td>
                <img height="100" width="200" src="<?=Html::encode($model->picture)?>"/>
            </td>
        </tr>
        <tr id="goodsdescription">
            <td><?= $model->attributeLabels()['description']; ?></td>
            <td>
                <?=$model->description;?>
            </td>
            <td><?= $model->attributeLabels()['content']; ?></td>
            <td>
                <?=$model->content;?>
            </td>
        </tr>
        <tr id="goodsmechanic_id">
            <td>机构</td>
            <td>
                <?=(!empty($mechanic)&&isset($mechanic->name))?$mechanic->name:'';?>
            </td>
            <td><?= $model->attributeLabels()['max_buy']; ?></td>
            <td>
                <?=Html::encode($model->max_buy);?>
            </td>
        </tr>
        <tr id="goodsscore">
            <td><?= $model->attributeLabels()['score']; ?></td>
            <td>
                <?=Html::encode($model->score);?>
            </td>
            <td ><?= $model->attributeLabels()['store_prompt']; ?></td>
            <td>
                <?=Html::encode($model->store_prompt);?>
            </td>
        </tr>
        <tr id="goodsnostore_sell">
            <td><?= $model->attributeLabels()['nostore_sell']; ?></td>
            <td>
                <?=Html::encode($model->nostore_sell=='Y'?'是':'否');?>
            </td>
            <td><?= $model->attributeLabels()['is_buy']; ?></td>
            <td>
                <?=Html::encode($model->is_buy=='1'?'是':'否');?>
            </td>
        </tr>
        <tr id="goodsis_show">
            <td><?= $model->attributeLabels()['is_show']; ?></td>
            <td>
                <?=Html::encode($model->is_show=='1'?'是':'否');?>
            </td>
            <td><?= $model->attributeLabels()['is_shelve']; ?></td>
            <td>
                <?=Html::encode($model->is_shelve=='1'?'上架':'下架');?>
            </td>
        </tr>
    </table>
    <h3 class="yx-font13 yx-pb6">艺教学课程信息：</h3>
    <div class="docs-main zx-mg">
        <table id="tablesaw" class="tablesaw table yx-table1 yx-table3 table-striped with-check"  >
            <thead>
            <tr class="yx-bgd2f6ec">
                <th><?=\Yii::t('zhtfrontend','课程名称');?></th>
                <th><?=\Yii::t('zhtfrontend','类型');?></th>
                <th><?=\Yii::t('zhtfrontend','上课时间');?></th>
                <th><?=\Yii::t('zhtfrontend','最大人数');?></th>
                <th><?=\Yii::t('zhtfrontend','课次');?></th>
                <th><?=\Yii::t('zhtfrontend','价格');?></th>
                <th><?=\Yii::t('zhtfrontend','操作');?></th>
            </thead>
            <?php if($modelart != null) { ?>
            <tr>
                <td><?=$modelart->title?></td>
                <td><?php
                     switch ($modelart->type){
                         case 1:
                             echo '益智';
                             break;
                         case 2:
                             echo '音乐';
                             break;
                         default :
                             echo '形体';
                             break;
                     }
                    ?></td>
                <td><?=Util::getWeek($modelart->class_day).' '.$modelart->star_time.'-'.$modelart->end_time?></td>
                <td><?=$modelart->max_count?></td>
                <td><?=$modelart->class_count?></td>
                <td><?=$modelart->price?></td>
                <td><a data-url="<?=\common\components\helpers\Fun::url(['goodsskill/viewgroup','id'=>$modelart->id])?>" rel="dialog-show-iframe" class="btn yx-radius2 yx-d-card yx-bg94d5a2" data-size="800*500" data-name="查看">查看</a> </td>
            </tr>
            <?php } ?>
        </table>
    </div>
</div>
</div>
